package page.app.wallet;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.ui.ExpectedConditions;
import basicTool.WaitTool;
import io.appium.java_client.AppiumDriver;
import page.app.AbstractAppPage;

public class PacketAndTicketHistoryPage extends AbstractAppPage {
	@FindBy(xpath="//UIAStaticText[@name='历史']|//android.widget.TextView[@text='历史']")
	private WebElement historyTitle;
	@FindBy(xpath = "//UIATableCell[8]|//android.widget.RelativeLayout[4]")
	private WebElement packetAndTicketListNo4;
	
	public PacketAndTicketHistoryPage(AppiumDriver appiumDriver) {
        super(appiumDriver);
        WaitTool.waitFor(appiumDriver, ExpectedConditions.visibilityOf(historyTitle), DefaultWaitElementTime4Page);
    }
	public PacketAndTicketDetailPage IntoPacketAndTicketPageDetailPage() throws Exception{
		return click(packetAndTicketListNo4,PacketAndTicketDetailPage.class);
	}
	public void IntoPacketPage() throws Exception{
		super.swipe(4,1);
		WaitTool.waitFor(appiumDriver, ExpectedConditions.visibilityOf(historyTitle), DefaultWaitElementTime4Page);	
	}
}
